﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace TGM
{
    public class RegForm : Form
    {
        private readonly IContainer components;
        private TextBox CodeTextBox;
        private Button SubmitButton;

        public RegForm()
        {
            InitializeComponent();
        }

        public string RegCode { get; set; }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            SubmitButton = new Button();
            CodeTextBox = new TextBox();
            base.SuspendLayout();
            SubmitButton.Location = new Point(0xc5, 80);
            SubmitButton.Name = "SubmitButton";
            SubmitButton.Size = new Size(0x4b, 0x17);
            SubmitButton.TabIndex = 0;
            SubmitButton.Text = "Submit";
            SubmitButton.UseVisualStyleBackColor = true;
            SubmitButton.Click += SubmitButton_Click;
            CodeTextBox.Location = new Point(0x21, 0x1b);
            CodeTextBox.Name = "CodeTextBox";
            CodeTextBox.Size = new Size(0xe1, 0x15);
            CodeTextBox.TabIndex = 1;
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(0x11c, 0x73);
            base.Controls.Add(CodeTextBox);
            base.Controls.Add(SubmitButton);
            base.Name = "RegForm";
            base.StartPosition = FormStartPosition.CenterParent;
            Text = "RegForm";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        private void SubmitButton_Click(object sender, EventArgs e)
        {
            RegCode = CodeTextBox.Text.Trim();
            base.DialogResult = DialogResult.OK;
        }
    }
}